import { createApp } from 'vue'
import App from './App.vue'
import router from './router';
import store from './store';
import elementPlus from './plugins/element';
// 初始化css 重置css默认样式
import 'normalize.css/normalize.css'
// 全局 css
import '@/styles/index.scss'
// 支持svg
import 'virtual:svg-icons-register'
import svgIcon from '@/components/SvgIcon/index.vue';

// elementui组件
// 挂载到vue实例上
import { ElMessageBox, ElMessage, ElNotification } from 'element-plus'
// export const createApp = ViteSSG(
//     App,
//     { routes }
// );
createApp(App)
    .use(router)
    .use(store)
    .use(elementPlus)
    .component('svg-icon', svgIcon)
    .mount('#app');

// vue实例上挂载属性类型声明
declare module '@vue/runtime-core' {
    interface ComponentCustomProperties {
        $message: typeof ElMessage;
        $notify: typeof ElNotification;
        $confirm: typeof ElMessageBox.confirm;
        $alert: typeof ElMessageBox.alert;
        $prompt: typeof ElMessageBox.prompt;
    }
}